package org.lib.eshello;

import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate;
import org.springframework.data.elasticsearch.core.RefreshPolicy;

/**
 * 应用配置
 * @author ben
 * @date 2021-09-16 11:24:07 CST
 */
@Configuration
public class AppConfig {

//	/**
//	 * 定制ElasticsearchRestTemplate：方法名要去掉Rest
//	 * @author ben
//	 * @date 2021-09-17 09:43:36 CST
//	 * @param client
//	 * @return
//	 */
//	@Bean
//	public ElasticsearchRestTemplate elasticsearchTemplate(RestHighLevelClient client) {
//		ElasticsearchRestTemplate t = new ElasticsearchRestTemplate(client);
//		t.setRefreshPolicy(RefreshPolicy.IMMEDIATE);
//		return t;
//	}
	
}
